import { Injectable, Inject, BadRequestException } from '@nestjs/common';
import { Schema } from 'mongoose';

import { BlogModel } from '@server/models';
import { AuthService } from '@server/auth';

@Injectable()
export default class LocalesService {
  constructor(
    private readonly authService: AuthService,
    @Inject('BLOG_MODEL') private readonly blogModel: typeof BlogModel,
  ) {}

  create() {
    this.blogModel
      .create({
        langs: 'zh-en',
        content: {
          title: '111',
          content: '11111',
        },
      })
      .then(
        () => console.log(111),
        (e) => console.log(e),
      )
      .catch(console.log);

    return 11;
  }
}
